xen/arm: gic: Add sanity checks gic_route_irq_to_guest
authorJulien Grall <julien.grall@linaro.org>
Wed, 1 Apr 2015 16:21:44 +0000 (17:21 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 2 Apr 2015 09:42:35 +0000 (10:42 +0100)
commit3998a3ce50b0dce1275dc31a3113f99e692cd67a
tree513ad4dffec1064e37c02a30a060ddefa44ac468
parent86ce68f7bbf24269b9ebe4bd132a6f7d3455a6bf
xen/arm: gic: Add sanity checks gic_route_irq_to_guest

With the addition of interrupt assignment to guest, we need to make sure
the guest can't blow up the interrupt management in Xen.

Before associating the IRQ to a vIRQ we need to make sure:
    - the vIRQ is not already associated to another IRQ
    - the guest didn't enable the vIRQ

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic.c
xen/arch/arm/irq.c
xen/include/asm-arm/gic.h